import React from 'react';
import { Route, Routes } from 'react-router-dom';
import WelcomePage from '@/renderer/views/Welcome/Welcome';
// import DataInsertPage from '@/renderer/views/DataInsert/DataInsert';
import DataFetchPage from '@/renderer/views/DataFetch/DataFetchPage';
import DataAnalysisPage from '@/renderer/views/DataAnalysis/DataAnalysis';
import RemoveFile from '@/renderer/views/RemoveFile/RemoveFile';
import Houseprice from '@/renderer/views/HousePrice/HousePrice';
import DataCompute from '@/renderer/views/DataCompute/index';
export const routesConfig = [
  { path: '/', element: <WelcomePage />, name: 'Home' },
  { path: '/data-fetch', element: <DataFetchPage />, name: 'Data Fetch' },
  {
    path: '/data-analysis',
    element: <DataAnalysisPage />,
    name: 'Data Analysis',
  },
  {
    path: '/removefile',
    element: <RemoveFile />,
    name: 'RemoveFile',
  },
  {
    path: '/houseprice',
    element: <Houseprice />,
    name: 'Houseprice',
  },
    {
    path: '/datacompute',
    element: <DataCompute />,
    name: 'DataCompute',
  },
  // { path: '/data-insert', element: <DataInsertPage />, name: 'Data Insert' },
];

const AppRoutes = () => {
  return (
    <Routes>
      {routesConfig.map((route, index) => (
        <Route key={index} path={route.path} element={route.element} />
      ))}
    </Routes>
  );
};

export default AppRoutes;
